﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ReactiveUI.Fody.Helpers;
using System.Windows.Media;
using System.Windows;

namespace Common.ViewModels
{
    /// <summary>
    /// 直线段(可)
    /// </summary>
    [Serializable]
    [JsonObject(MemberSerialization.OptOut)]
    public class LineRigidBody:MoveBase
    {


        /// <summary>
        /// 名称
        /// </summary>
        [Reactive] public string Name { get; set; }

       

        /// <summary>
        /// 可以根据中心点算出左上角位置(这种根据中心点计算圆心才真正合适)
        /// </summary>
        [Reactive]
        [JsonIgnore]public Point3D 左上角点 { get; set; }

        /// <summary>
        /// 长
        /// </summary>
        [Reactive] public double XLength { get; set; }

        /// <summary>
        /// 宽
        /// </summary>
        [Reactive] public double YLength { get; set; }

        /// <summary>
        /// 高
        /// </summary>
        [Reactive] public double ZLength { get; set; }

        /// <summary>
        /// X位置
        /// </summary>
        [Reactive] public double PositionX { get; set; }

        [Reactive] public double PositionY { get; set; }

        [Reactive] public double PositionZ { get; set; }

        /// <summary>
        /// 是否使用X偏移
        /// </summary>
        [Reactive] public bool IsUseXOffset { get; set; }

        /// <summary>
        /// 是否使用X偏移
        /// </summary>
        [Reactive] public bool IsUseYOffset { get; set; }

        /// <summary>
        /// 背景颜色
        /// </summary>
        [Reactive] public Brush Background { get; set; } = Brushes.Bisque;

        /// <summary>
        /// 字体颜色
        /// </summary>
        [Reactive] public Brush Fore { get; set; } = Brushes.Black;

        /// <summary>
        /// 字体大小
        /// </summary>
        [Reactive] public double FontSize { get; set; } = 14;

        /// <summary>
        /// 字体的Z
        /// </summary>
        [Reactive] public double TypeFaceZ { get; set; } = 140;

        /// <summary>
        /// 字体Margin
        /// </summary>
        [Reactive] public Thickness TypeFaceMaggin { get; set; } = new(0);

        /// <summary>
        /// 字体是否可见
        /// </summary>
        [Reactive] public bool TypeFaceIsVisiable { get; set; } = false;

        /// <summary>
        /// 字体旋转
        /// </summary>
        [Reactive] public double TypeFaceAngle { get; set; } = 0;

        /// <summary>
        /// 图层
        /// </summary>
        [Reactive] public int Zindex { get; set; }

    }

    /// <summary>
    /// 轨道(轨道可为直线段 也可为圆弧段,轨道是移动的基础)
    /// </summary>
    public class 轨道 :BaseViewModel
    {
       
    }
}
